package org.yellow.backend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yellow.backend.mapper.medicinedispenceMapper;
import org.yellow.backend.pojo.medicinedispence;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Service
@SuppressWarnings({"all"})
public class medicinedispenceService {
    @Autowired
    medicinedispenceMapper mapper;

    /**
     * 根据id查询领药表
     * @param id
     * @return
     */
    public medicinedispence selectMedicinedispenceById(int id){
        return mapper.selectById(id);
    }

    /**
     * 插入一个新的领药表
     * @param md
     * @return
     */
    public boolean insertNew(medicinedispence md){
        mapper.insert(md);
        return true;
    }

    /**
     * 删除一个领药表
     * @param id
     * @return
     */
    public boolean deleteOld(int id){
        mapper.deleteById(id);
        return true;
    }


}
